Optimal. Leaf size=26 \[ -\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \cot (x)}{\sqrt{a \csc ^2(x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0156433, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {4122, 217, 206} \[ -\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \cot (x)}{\sqrt{a \csc ^2(x)}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4122
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \sqrt{a \csc ^2(x)} \, dx &=-\left (a \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+a x^2}} \, dx,x,\cot (x)\right )\right )\\ &=-\left (a \operatorname{Subst}\left (\int \frac{1}{1-a x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a \csc ^2(x)}}\right )\right )\\ &=-\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \cot (x)}{\sqrt{a \csc ^2(x)}}\right )\\ \end{align*}
Mathematica [A] time = 0.0160915, size = 30, normalized size = 1.15 \[ \sin (x) \sqrt{a \csc ^2(x)} \left (\log \left (\sin \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.126, size = 32, normalized size = 1.2 \begin{align*}{\frac{\sqrt{4}\sin \left ( x \right ) }{2}\sqrt{-{\frac{a}{ \left ( \cos \left ( x \right ) \right ) ^{2}-1}}}\ln \left ( -{\frac{-1+\cos \left ( x \right ) }{\sin \left ( x \right ) }} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.6668, size = 32, normalized size = 1.23 \begin{align*} -\sqrt{-a}{\left (\arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.494227, size = 188, normalized size = 7.23 \begin{align*} \left [\frac{1}{2} \, \sqrt{-\frac{a}{\cos \left (x\right )^{2} - 1}} \log \left (-\frac{\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1}\right ) \sin \left (x\right ), \sqrt{-a} \arctan \left (\frac{\sqrt{-a} \sqrt{-\frac{a}{\cos \left (x\right )^{2} - 1}} \cos \left (x\right ) \sin \left (x\right )}{a}\right )\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \csc ^{2}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23949, size = 18, normalized size = 0.69 \begin{align*} \sqrt{a} \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) \mathrm{sgn}\left (\sin \left (x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]